package com.rainman.noswagger.info_bean;

import com.github.javaparser.ast.body.Parameter;
import com.rainman.noswagger.NoSwaggerCore;
import com.rainman.noswagger.core.BaseBean;
import lombok.Data;


@Data
public class MethodParamInfoBean extends BaseBean {

    private Parameter parameter;
    private String paramCommentStr;

    /**
     * 类名
     */
    private String typeClassName;

    /**
     * 描述
     */
    private String descStr;


    private ClassInfoBean classInfoBean;


    public MethodParamInfoBean(Parameter parameter, NoSwaggerCore core,
                               String typeClassName,String paramCommentStr
            ,ClassInfoBean classInfoBean){
        super(parameter.getNameAsString(),core,parameter.getAnnotations(),null);
        this.parameter=parameter;
        this.paramCommentStr=paramCommentStr;
        this.descStr=paramCommentStr;
        this.classInfoBean=classInfoBean;
        this.typeClassName=typeClassName;

    }


/*
    public JSONObject getInfo(){

        JSONObject reJson=new JSONObject();
        reJson.set("name",getName());
        reJson.set("typeClassName",typeClassName);
        reJson.set("descStr",descStr);
        reJson.set("classInfoBean",classInfoBean==null?null:classInfoBean.getInfo());

        for (String key : getOtherInfo().keySet()) {
            reJson.set(key,getOtherInfo().get(key));
        }
        return reJson;
    }
*/


}
